namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0046 : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.IcmInventoryStockTakingItem", "StockTakingId", c => c.Int(nullable: false));
            AlterColumn("dbo.IcmInventoryStockTaking", "StockTakingId", c => c.Int(nullable: false, identity: true));
            DropPrimaryKey("dbo.IcmInventoryStockTaking", new[] { "StockTakingID" });
            AddPrimaryKey("dbo.IcmInventoryStockTaking", "StockTakingId");
            DropColumn("dbo.IcmInventoryStockTakingItem", "StockTakingCode");
        }
        
        public override void Down()
        {
            AddColumn("dbo.IcmInventoryStockTakingItem", "StockTakingCode", c => c.Int(nullable: false));
            DropPrimaryKey("dbo.IcmInventoryStockTaking", new[] { "StockTakingId" });
            AddPrimaryKey("dbo.IcmInventoryStockTaking", "StockTakingID");
            AlterColumn("dbo.IcmInventoryStockTaking", "StockTakingID", c => c.Int(nullable: false, identity: true));
            DropColumn("dbo.IcmInventoryStockTakingItem", "StockTakingId");
        }
    }
}
